#include <stdio.h>
#include <string.h>

struct Data 
{
	int year;
	int month;
	int day;
};
struct Student
{
	int id;
	char name[10];
	float score;
	struct Data birthday;
};
void printStudent(struct Student *s)
{
	printf("%d %s %f %d-%d-%d\n",s->id,s->name,s->score,s->birthday.year,s->birthday.month,s->birthday.day);
}


void printStudents(struct Student *s,int len)
{
	 len = sizeof(s) / sizeof(*s);
	int i;
	for(i = 0;i < len;++i)
	{
		printStudent(s + i);
	}
}
int main(void)
{
/*
	char *p,*q;
	char s1[100] = {"abc"};
	char s2[100] = {"abc"};
	p = s1;
	q = s2;
	strcat(p,q);
	puts(strcat(p,q));
*/
	struct Student s[] = {{1,"zhangsan",99,{1999,8,2}},{2,"lisi",98,{2000,8,1}},{3,"wangwu",97,{2001,8,2}}};
	int len = sizeof(s) / sizeof(*s);
	printStudents(s,len);
	
/*	scanf("%d%s%f",&s.id,s.name,&s.score);
	printf("%d %s %f\n",s.id,s.name,s.score);
*/
	
	return 0;
}
